package com.tang.service.admin.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.tang.common.enums.UserStatus;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tang.common.utils.excel.annotation.ExcelEnum;
import com.tang.common.utils.excel.converter.EnumConverter;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import com.tang.framework.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;


@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "后台用户表")
@TableName(value = "sys_user")
public class SysUser extends BaseEntity<SysUser>{


    @Schema(description = "昵称")
    @ExcelProperty(value = "昵称")
    @TableField(value = "`nick_name`")
    private String nickName;


    @Schema(description = "真实姓名")
    @ExcelProperty(value = "真实姓名")
    @TableField(value = "`real_name`")
    private String realName;


    @Schema(description = "手机号")
    @ExcelProperty(value = "手机号")
    @TableField(value = "`phone`")
    private String phone;


    @Schema(description = "邮箱")
    @ExcelProperty(value = "邮箱")
    @TableField(value = "`email`")
    private String email;


    @Schema(description = "头像")
    @ExcelIgnore
    @TableField(value = "`avatar`")
    private String avatar;


    @Schema(description = "后台用户状态")
    @ExcelProperty(value = "后台用户状态", converter = EnumConverter.class)
    @ExcelEnum
    @TableField(value = "`status`")
    private UserStatus status;


    @Schema(description = "用户密码")
    @TableField(value = "`password`")
    private String password;

}
